<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.google.appengine.api.users.User" %>

<%
	User user = (User) request.getAttribute("user");
	String error = (String) request.getAttribute("error");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>Share-a-Photo! | Error</title>
		<link type="text/css" rel="stylesheet" href="/static/css/reset.css"  media="all" /> 
		<link type="text/css" rel="stylesheet" href="/static/css/main.css" media="all" />
	</head>
	<body>
		<!-- header -->
		<div id="header">
			<h1><a href="/">Share-a-Photo</a></h1>
			<div id="user-bar">
				<% if(user == null){ %>
						Welcome, please <a href="<%=request.getAttribute("loginUrl") %>">login</a>
				<% } else { %>
						<span id="login-name"><%= user.getNickname() %></span> <a href="/upload">Upload a photo</a> | <a href="<%=request.getAttribute("logoutUrl") %>">logout</a>
				<% } %>
			</div>
		<!-- /header -->
		</div>
		
		<!-- content-wrap -->
		<div id="content-wrap">
			<!-- content -->
			<div id="content">
				<h1><%= error %></h1>
			<!-- /content -->
			</div>
			
		<!-- /content-wrap -->
		</div>
		
		<!-- footer -->
		<div id="footer">
			<p>Share-a-Photo | Powered by <a href="http://code.google.com/appengine/">Google App Engine</a></p>
		<!-- /footer -->
		</div>
	</body>
</html>